package com.zs.servlet;

import com.zs.http.Request;
import com.zs.http.Response;

public abstract class MyHttpServlet implements Myservlet{

    public void service(Request request, Response response) {
        if (request.getMethod().equalsIgnoreCase("GET")) {
            this.doGet( request, response);
        } else {
            this.doPost( request, response);
        }
    }

    public abstract void doGet(Request request, Response response);
    public abstract void doPost(Request request, Response response);
}
